<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
  function resolveAfter2Seconds() {
    return new Promise(resolve => {
      setTimeout(() => {
        resolve('resolved');
      }, 2000);
    });
  }

  async function asyncCall() {
    console.log('calling');
    await resolveAfter2Seconds().then((result)=>{
      console.log(result);
      return resolveAfter2Seconds()
    }).then((result)=>{
      console.log(result);
    })
    console.log(1111);
    // expected output: 'resolved'
  }

  asyncCall();
  console.log('end');

</script>
</body>
</html>
